package util

import "time"

func BeginningOfDay(t time.Time) time.Time {
	year, month, day := t.Date()
	return time.Date(year, month, day, 0, 0, 0, 0, t.Location())
}

func BeginningOfToday() time.Time {
	return BeginningOfDay(time.Now())
}

func BeginningOfNextDay() time.Time {
	return BeginningOfDay(time.Now().Add(time.Hour * 24))
}
